<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>表单输入绑定</title>
  <script src="https://cdn.bootcss.com/vue/2.6.11/vue.min.js"></script>
  <style>
    .box {
      border-bottom: 1px solid red;
      margin-bottom: 20px;
      padding-bottom: 5px;
    }
    .tip {
      color: red;
    }
  </style>
</head>
<body>
  <h1>表单输入绑定</h1>
  <div id="app">
    <div class="box">
      <h3>v-model</h3>
      <p>
        <input type="text" v-model="msg">
        <span class="tip">{{ msg }}</span>
      </p>
    </div>

    <div class="box">
      <h3>绑定</h3>
      <p>
        <input
        type="checkbox"value
        v-model="toggle"
        true-value="yes"
        false-value="no"
      >
      <span class="tip"> {{toggle}}</span>

      </p>
    </div>

    <div class="box">
      <h3>lazy 修饰符</h3>
      <p>
        <input type="text" v-model.lazy="tlazy">
        <span class="tip">{{ tlazy }}</span>
      </p>
    </div>

  </div>

  <script>
    var vue = new Vue({
      el: "#app",
      data: {
        msg: "Hello, World",
        toggle: '',
        tlazy: ""
      }
    })
  </script>
</body>
</html>